﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Collections;
using System.Reflection;
using System.IO;

namespace main
{
    public partial class testForm : application.baseForm
    {
        data.salesDS.OrderDataTable orderTbl = new data.salesDS.OrderDataTable();
        public testForm()
        {
            InitializeComponent();
        }
        private void SetStatusImg()
        {
            data.applicationDS.VoucherRow row;
            for (int idx = 0; idx < dataGrid.Rows.Count; idx++)
            {
                row = (data.applicationDS.VoucherRow)((DataRowView)dataGrid.Rows[idx].DataBoundItem).Row;
                if (row.RowState == DataRowState.Detached || row.RowState == DataRowState.Deleted) continue;
                (dataGrid[statusImgColumn.Name, idx] as DataGridViewImageCell).Value = common.SysLibs.GetStatusImage(row.status);
            }
        }

        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                //DataAccess.DataLibs.AddSysLogERROR("aaa");
                //DataAccess.DataLibs.AddSysLogSYS("ccc","dd","ee");
                //DataAccess.DataLibs.AddSysLog(common.SysErrorSeverity.Emergency, common.SysLogTypes.User,"ccc", "dd",
                //    "eefhfhfgdgdg fgfgfgfgfgfgfgf fhfhhfhf fhfffffffffffffffff fhfh //DataAccess.DataLibs.VoucherOptions option = new DataAccess.DataLibs.VoucherOptions() ");
                //DataAccess.DataLibs.VoucherOptions option = new DataAccess.DataLibs.VoucherOptions();
                //option.ToDate = DateTime.Today.AddMonths(-12);
                //option.FromDate = option.ToDate.AddMonths(-1);
                //myApplicationDS.Voucher.Clear();
                //DataAccess.DataLibs.LoadData(myApplicationDS.Voucher, option);
                //SetStatusImg();
            }
            catch (Exception er)
            {
                this.ShowError(er);
            }
        }
    }
}
